<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .all{
            display: flex;
            position: relative;
        }
        .pics{
            width: 240px;
            height: 180px;
            position: absolute;
        }
        img{
            width: 240px;
            height: 180px;
        }
        .zoom{
            transform: scale(150%);
        }
    </style>
</head>
<body>
    <section class="all">
        <div class="pics">
            <img src="../images/1.jpg" alt="">
        </div>
        <div class="pics" style="left: 260px;">
            <img src="../images/2.jpg" alt="">
        </div>
    </section>

    <script>
        var pic=document.querySelectorAll('.pics')
        for(var i=0;i<pic.length;i++){
            pic[i].onmouseover=function(){
                this.className="zoom"
            }
            pic[i].onmouseout=function(){
                this.className=""
            }
        }
    </script>
</body>
</html>